/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_master_status")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosMasterStatus.findAll", query = "SELECT p FROM PosMasterStatus p"),
//    @NamedQuery(name = "PosMasterStatus.findBySync", query = "SELECT p FROM PosMasterStatus p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosMasterStatus.findByStatusId", query = "SELECT p FROM PosMasterStatus p WHERE p.statusId = :statusId"),
//    @NamedQuery(name = "PosMasterStatus.findByStatusName", query = "SELECT p FROM PosMasterStatus p WHERE p.statusName = :statusName")})
public class PosMasterStatus implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "status_id")
    private Integer statusId;
    @Column(name = "status_name")
    private String statusName;
   

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getStatusId() {
        return statusId;
    }

    public void setStatusId(Integer statusId) {
        this.statusId = statusId;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (statusId != null ? statusId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosMasterStatus)) {
            return false;
        }
        PosMasterStatus other = (PosMasterStatus) object;
        if ((this.statusId == null && other.statusId != null) || (this.statusId != null && !this.statusId.equals(other.statusId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return statusName;
//        return "com.buanalintas.ronsicecream.pos.entities.PosMasterStatus[ statusId=" + statusId + " ]";
    }
    
}
